import request from '@/util/ProRequest'


export function addTask(data) {
    return request({
        url: '/task/add',
        method: 'post',
        data
    })
}
export function queryTask(params) {
    return request({
        url: '/task/list',
        method: 'get',
        params
    })
}
export function queryPage(params) {
    return request({
        url: '/task/page',
        method: 'get',
        params
    })
}
export function queryTaskByCode(code) {
    return request({
        url: `/task/get?code=`+code,
        method: 'get',
    })
}
export function updateTask(data) {
    return request({
        url: '/task/update',
        method: 'put',
        data
    })
}
export function deleteTask(id) {
    return request({
        url: '/task/delete/'+id,
        method: 'delete',
    })
}
export function batchDeleteTask(ids) {
    return request({
        url: '/task/batchDelete?'+ids,
        method: 'delete',
    })
}